package Singleton;

import Singleton.interfaces.Singleton;
import Singleton.singleton.DoubleCheckedLocking;
import Singleton.singleton.EagerlySingleton;
import Singleton.singleton.LazySingleton;

/**
 * 单例模式
 *
 * @Author: pengzx
 * @Description:
 * @Date: 14:28 2017/9/11
 * @Modified by: 1.0
 */
public class Demo {
    public static void main(String[] args)
    {
        Singleton singleton = LazySingleton.getInstance();
        singleton = EagerlySingleton.getInstance();
        singleton = DoubleCheckedLocking.getInstance();
        singleton.say();

    }
}
